// 非首页顶部组件
Vue.component('cm-header', {
    props: ['login'],
    methods: {
        onRollOut: function() {
            localStorage.removeItem('token')
			window.location.href="/pc/public/login";
        }
    },
    template: `<header class="header">
                    <div class="header__box">
                        <a href="/pc/index.html">
                            <img src="../../imgs/icon.png" alt="logo"/>
                            <span class="name">策美科技</span>
                        </a>
                        <div class="header-right" v-if="login">
                            <button class="btn" @click="onRollOut">退出</button>
                        </div>
                    </div>
                </header>`
})

